package com.cjm.one.webmanager.controller.customer;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjm.one.common.result.Result;
import com.cjm.one.model.custom.entity.CustomerLoginLog;
import com.cjm.one.webmanager.service.customer.CustomerLoginLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@Tag(name = "5-客户信息管理", description = "客户信息管理")
@RequestMapping("/manager/customer/loginLog")
public class CustomerLoginLogController {
    @Resource
    private CustomerLoginLogService customerLoginLogService;
    @GetMapping("/list")
    @Operation(summary = "客户登录日志列表")
    public Result<Page<CustomerLoginLog>> list(@RequestParam(name = "current",defaultValue = "1") Integer current,
                                               @RequestParam(name = "size",defaultValue = "10") Integer size,
                                               @RequestParam(name = "customerId") String customerId,
                                               @RequestParam(name = "startTime") String startTime,
                                               @RequestParam(name = "endTime") String endTime
    ){
        return customerLoginLogService.list(current,size,customerId,startTime,endTime);
    }
}
